<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class RequestHttpRawTest extends UnitTestCase
{
    function testingRequestHttpRaw()
    {
        $struct = new Entity\RequestHttpRaw();
        
        $this->assertIdentical($struct,new Entity\RequestHttpRaw);
        $this->assertTrue($struct instanceof Entity\RequestHttpRaw);
        
        $struct->headers = 'php';
        $this->assertEqual( 'php', $struct->headers);
        $struct->body = 'ezc';
        $this->assertEqual( 'ezc', $struct->body);
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'headers' => 'php',
        'body' => 'ezc',
        );
        
        $struct = Entity\RequestHttpRaw::__mock( $state );
        $this->assertEqual( 'php', $struct->headers);
        $this->assertEqual( 'ezc', $struct->body);
    }
}

